package club.ljwang.dao;


import club.ljwang.pojo.Member;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface MemberMapper {
    public List<Member> findAll();

    public Page<Member> selectByCondition(String queryString);

    public Integer add(Member member);

    public void deleteById(Integer id);

    public Member findById(Integer id);

    public Member findByTelephone(@Param("telephone") String telephone);

    public void edit(Member member);

    public Integer findMemberCountBeforeDate(@Param("date") String date);

    public Integer findMemberCountByDate(@Param("date")String date);

    public Integer findMemberCountAfterDate(@Param("date")String date);

    public Integer findMemberTotalCount();


    void editReservationsByDate(Date orderDate);


    int editReservationsByDate2(@Param("orderDate") Date orderDate, @Param("version") int version);

    Integer getMemberReport(String month);


    List<Map> getSetmealReport();

    List<Member> getFamily(@Param("id") Integer id);

    List<Map<String, Object>> countMemberSex();

    List<Map<String, Object>> countMemberAge();
}
